import fetcher from "../apis/Fetcher";



export function logInByPhoneNumberAndPassword(params:any){
    return fetcher.put<string>("authorization/logIn", {...params,client:"MINI_PROGRAM"})
}

export function logInByWechatOpenIdAndPhoneNumber(params:any){
    return fetcher.put<string>("authorization/logIn", {...params,client:"MINI_PROGRAM"})
}

export function logOut(){
    return fetcher.delete("authorization")
}

export interface UpdatePasswordRequest{
    password:string
    newPassword:String
}

export function updatePassword(request:UpdatePasswordRequest){
    return fetcher.post("authorization/updatePassword",{},request)
}
